<template>
	<view class="all">
		<view class="flex justify-between align-center">
			<view class="t">
				{{data.list.title}}
			</view>
			<view class="time" v-if="data.list.CreatedAt">
				{{$clearTime(data.list.CreatedAt)}}
			</view>
		</view>
		<view class="c">
			{{data.list.explain}}
		</view>
	</view>
</template>

<script setup>
	import {ref,reactive,getCurrentInstance} from "vue";
	import {onLoad,onShow} from "@dcloudio/uni-app";
	const { appContext } = getCurrentInstance();
	const data = reactive({
		id:0,
		list:{}
	})
	onLoad((option)=>{
		getData(option.id)
	})
	onShow(()=>{
		
	})
	function getData(id){
		appContext.config.globalProperties.$SHOPrequest({
			url:`business/messageList/`,
			method:'post',
			data:{
				id:Number(id),
			},
			success:(res)=>{
				console.log(res)
				data.list = res.data
			}
		})
	}
</script>

<style lang="scss" scoped>
	.c{
		font-weight: 400;
		font-size: 32rpx;
		color: #333333;
		margin-top: 30rpx;
	}
	.t{
		font-weight: bold;
		font-size: 36rpx;
		color: #000000;
	}
	.time{
		font-size: 24rpx;
		color: #999999;
	}
	.all{
		background-color: #fff;
		min-height: 100vh;
		padding: 24rpx;
	}
</style>
